package cn.tedu;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class TestObjectIO {
    public static void main(String[] args) {
    method();
    }

    private static void method() {
        ObjectInputStream objectInputStream=null;
        try {
            objectInputStream = new ObjectInputStream(new FileInputStream("G:\\Project01\\Student\\张三.txt"));
            System.out.println("111");
            System.out.println(objectInputStream);
            System.out.println(objectInputStream.readObject());

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (objectInputStream!=null){
                try {
                    objectInputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
